// import process from "process";
// import { Buffer } from "buffer";

import { createApp } from "vue";
import App from "./App.vue";
import setupPlugins from "@/plugins";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 暗黑主题样式
import "element-plus/theme-chalk/dark/css-vars.css";
// 暗黑模式自定义变量
import "@/styles/dark/css-vars.css";
import "@/styles/index.scss";
import "uno.css";
import Antd from "ant-design-vue";
import "ant-design-vue/dist/reset.css";

// 全局引入 animate.css
import "animate.css";

// 自动为某些默认事件（如 touchstart、wheel 等）添加 { passive: true },提升滚动性能并消除控制台的非被动事件监听警告
import "default-passive-events";

import FcDesigner from "@form-create/designer";
import ELEMENT from "element-plus";
import "element-plus/dist/index.css";

// window.Buffer = Buffer;
// window.process = process;
// process.env = {};
const app = createApp(App);

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

// 注册插件
app.use(ELEMENT);
app.use(FcDesigner);
app.use(FcDesigner.formCreate);

app.use(setupPlugins);
app.use(Antd);
app.mount("#app");
